<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexTenantIdAndProjectIdInOrder extends AbstractMigration
{
    public function up()
    {
        $this->table('order')->addIndex(['from_tenant_id','to_tenant_id','project_id'],['name' => 'idx_tenant_id_project_id_index', 'type' => 'normal'])->save();
    }

    public function down()
    {
        $this->table('order')->removeIndexByName('idx_tenant_id_project_id_index')->save();
    }
}
